package com.hysf.entity;

import java.util.Objects;

public class Buy {

    private String pname;
    private Double oprice;

    private Double cprice;

    private int number;

    private Long userid;

    private Long pid;
    /**
     *
     * @Description:
     *
     * @Author: 石涛
     * @Date: 2024/4/9 10:51
     **/

    public Buy() {
    }
    /**
     *
     * @Description:
     *
     * @Author: 石涛
     * @Date: 2024/4/9 10:51
     **/
    public Buy(String pname, Double oprice, Double cprice, int number, Long userid, Long pid) {
        this.pname = pname;
        this.oprice = oprice;
        this.cprice = cprice;
        this.number = number;
        this.userid = userid;
        this.pid = pid;
    }
    /**
     *
     * @Description:
     *
     * @Author: 石涛
     * @Date: 2024/4/9 10:51
     **/
    public String getPname() {
        return pname;
    }
    /**
     *
     * @Description:
     *
     * @Author: 石涛
     * @Date: 2024/4/9 10:51
     **/
    public void setPname(String pname) {
        this.pname = pname;
    }
    /**
     *
     * @Description:
     *
     * @Author: 石涛
     * @Date: 2024/4/9 10:51
     **/
    public Double getOprice() {
        return oprice;
    }
    /**
     *
     * @Description:
     *
     * @Author: 石涛
     * @Date: 2024/4/9 10:51
     **/
    public void setOprice(Double oprice) {
        this.oprice = oprice;
    }
    /**
     *
     * @Description:
     *
     * @Author: 石涛
     * @Date: 2024/4/9 10:51
     **/
    public Double getCprice() {
        return cprice;
    }
    /**
     *
     * @Description:
     *
     * @Author: 石涛
     * @Date: 2024/4/9 10:51
     **/
    public void setCprice(Double cprice) {
        this.cprice = cprice;
    }
    /**
     *
     * @Description:
     *
     * @Author: 石涛
     * @Date: 2024/4/9 10:51
     **/
    public int getNumber() {
        return number;
    }
    /**
     *
     * @Description:
     *
     * @Author: 石涛
     * @Date: 2024/4/9 10:51
     **/
    public void setNumber(int number) {
        this.number = number;
    }
    /**
     *
     * @Description:
     *
     * @Author: 石涛
     * @Date: 2024/4/9 10:51
     **/
    public Long getUserid() {
        return userid;
    }
    /**
     *
     * @Description:
     *
     * @Author: 石涛
     * @Date: 2024/4/9 10:51
     **/
    public void setUserid(Long userid) {
        this.userid = userid;
    }
    /**
     *
     * @Description:
     *
     * @Author: 石涛
     * @Date: 2024/4/9 10:51
     **/
    public Long getPid() {
        return pid;
    }
    /**
     *
     * @Description:
     *
     * @Author: 石涛
     * @Date: 2024/4/9 10:51
     **/
    public void setPid(Long pid) {
        this.pid = pid;
    }
    /**
     *
     * @Description:
     *
     * @Author: 石涛
     * @Date: 2024/4/9 10:51
     **/
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Buy buy = (Buy) o;
        return number == buy.number && Objects.equals(pname, buy.pname) && Objects.equals(oprice, buy.oprice) && Objects.equals(cprice, buy.cprice) && Objects.equals(userid, buy.userid) && Objects.equals(pid, buy.pid);
    }
    /**
     *
     * @Description:
     *
     * @Author: 石涛
     * @Date: 2024/4/9 10:51
     **/
    @Override
    public int hashCode() {
        return Objects.hash(pname, oprice, cprice, number, userid, pid);
    }
    /**
     *
     * @Description:
     *
     * @Author: 石涛
     * @Date: 2024/4/9 10:51
     **/
    @Override
    public String toString() {
        return "Buy{" +
                "pname='" + pname + '\'' +
                ", oprice=" + oprice +
                ", cprice=" + cprice +
                ", number=" + number +
                ", userid=" + userid +
                ", pid=" + pid +
                '}';
    }
}
